EXECUTABLE_1_NAME = epnp
SOURCES_1 = main epnp

CC = g++
LINK = g++

#CC = icpc
#LINK = icpc

DEBUG_OPTIM = -g -O3 -ffast-math -fomit-frame-pointer
WARNINGS = -Wall -Wextra

#BAZAR_INC = `pkg-config starter --cflags` `pkg-config garfeild --cflags`
#BIZAR_INC = `pkg-config garfield --cflags`
#OPENCV_INC = `pkg-config opencv --cflags`
# CLAPACK_INC = -I/System/Library/Frameworks/vecLib.framework/Versions/A/Headers/

ALL_LIBS_INCLUDE = $(BAZAR_INC) $(BIZAR_INC) $(OPENCV_INC) $(CLAPACK_INC)

#BAZAR_LIB = `pkg-config starter --libs` `pkg-config garfeild --libs`
#BIZAR_LIB = `pkg-config garfield --libs`
#OPENCV_LIB = `pkg-config opencv --libs`
# CLAPACK_LIB = -lblas -llapack
#OTHER_LIBS =

ALL_LIBS_LIB = -L/home/alex/OCV_install/lib -L/usr/lib -lopencv_core -lopencv_highgui  -lopencv_calib3d -lopencv_imgproc


CC_OPTIONS = -I/home/alex/Documentos -I/home/alex/OCV_install/include 
#-I/usr/include/opencv-2.3.1/ -I/usr/include/opencv-2.3.1/opencv 

LINK_OPTIONS = $(ALL_LIBS_LIB)


all: $(EXECUTABLE_1_NAME) $(EXECUTABLE_2_NAME) $(EXECUTABLE_3_NAME) $(EXECUTABLE_4_NAME) $(EXECUTABLE_5_NAME) $(EXECUTABLE_6_NAME) $(EXECUTABLE_7_NAME) $(EXECUTABLE_8_NAME) $(EXECUTABLE_9_NAME)

SOURCES_1_CPP = $(SOURCES_1:=.cpp)
SOURCES_1_OBJ = $(SOURCES_1:=.o)

SOURCES_2_CPP = $(SOURCES_2:=.cpp)
SOURCES_2_OBJ = $(SOURCES_2:=.o)

SOURCES_3_CPP = $(SOURCES_3:=.cpp)
SOURCES_3_OBJ = $(SOURCES_3:=.o)

SOURCES_4_CPP = $(SOURCES_4:=.cpp)
SOURCES_4_OBJ = $(SOURCES_4:=.o)

SOURCES_5_CPP = $(SOURCES_5:=.cpp)
SOURCES_5_OBJ = $(SOURCES_5:=.o)

SOURCES_6_CPP = $(SOURCES_6:=.cpp)
SOURCES_6_OBJ = $(SOURCES_6:=.o)

SOURCES_7_CPP = $(SOURCES_7:=.cpp)
SOURCES_7_OBJ = $(SOURCES_7:=.o)

SOURCES_8_CPP = $(SOURCES_8:=.cpp)
SOURCES_8_OBJ = $(SOURCES_8:=.o)

SOURCES_9_CPP = $(SOURCES_9:=.cpp)
SOURCES_9_OBJ = $(SOURCES_9:=.o)


$(EXECUTABLE_1_NAME): $(SOURCES_1_OBJ)
	$(LINK) $(SOURCES_1_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_1_NAME)

$(EXECUTABLE_2_NAME): $(SOURCES_2_OBJ)
	$(LINK) $(SOURCES_2_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_2_NAME)

$(EXECUTABLE_3_NAME): $(SOURCES_3_OBJ)
	$(LINK) $(SOURCES_3_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_3_NAME)

$(EXECUTABLE_4_NAME): $(SOURCES_4_OBJ)
	$(LINK) $(SOURCES_4_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_4_NAME)

$(EXECUTABLE_5_NAME): $(SOURCES_5_OBJ) $(GARFIELD_LIB)
	$(LINK) $(SOURCES_5_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_5_NAME)

$(EXECUTABLE_6_NAME): $(SOURCES_6_OBJ) $(GARFIELD_LIB)
	$(LINK) $(SOURCES_6_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_6_NAME)

$(EXECUTABLE_7_NAME): $(SOURCES_7_OBJ) $(GARFIELD_LIB)
	$(LINK) $(SOURCES_7_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_7_NAME)

$(EXECUTABLE_8_NAME): $(SOURCES_8_OBJ) $(GARFIELD_LIB)
	$(LINK) $(SOURCES_8_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_8_NAME)

$(EXECUTABLE_9_NAME): $(SOURCES_9_OBJ) $(GARFIELD_LIB)
	$(LINK) $(SOURCES_9_OBJ) $(LINK_OPTIONS) -o $(EXECUTABLE_9_NAME)

.cpp.o:
	$(CC) $(CC_OPTIONS) -c $*.cpp

dep: depend.inc
depend.inc:
	g++ -MM $(ALL_LIBS_INCLUDE) $(SOURCES_1_CPP) $(SOURCES_2_CPP) $(SOURCES_3_CPP) $(SOURCES_4_CPP) $(SOURCES_5_CPP) $(SOURCES_6_CPP) $(SOURCES_7_CPP) $(SOURCES_8_CPP) $(SOURCES_9_CPP) > depend.inc

clean:
	@rm -f *~ *.o depend.inc

include depend.inc
